<template>
  <div class="card">
    <img class="face" src="@/assets/user.jpeg" alt="" />
    <p class="back">
      <span>Raspberry</span>
    </p>
  </div>
</template>
<style lang="scss">
.card {
  position: relative;
  height: 100px;
  margin: 50px auto;
}
.back,
.face {
  width: 100px;
  height: 100px;
  position: absolute;
  // left: 50%;
  // transform: translate(-50%);
  background: #999;
  text-align: center;
  color: #fff;
  line-height: 100px;
  font-size: 20px;
  backface-visibility: hidden;
}
.card {
  perspective: 500px;
}
.card:hover .face {
  transform: rotateY(180deg);
}
.back {
  transform: rotateY(180deg);
}
.card:hover .back {
  transform: rotateY(0deg);
}
</style>
